www.gusucode.com > matlab从零到进阶程序与数据 > matlab从零到进阶程序与数据/第4章 MATLAB程序设计/NestedFunctionCallDemo5.m
function NestedFunctionCallDemo5 Nested1(5) function Nested1(x) disp(['Nested1执行,输入:',num2str(x)]) Nested11(6) function Nested11(xx) disp(['Nested11执行,输入:',num2str(xx)]); Nested111(pi) function Nested111(xxx) disp(['Nested111执行,输入:',num2str(xxx)]); Nested2(exp(1)) Nested22(100) end end end function Nested2(y) disp(['Nested2执行,输入:',num2str(y)]) Nested22(pi*pi) function Nested22(yy) disp(['Nested22执行,输入:',num2str(yy)]); end end end